import { Inject, Injectable } from '../decorators/inject';
import { Subject } from 'rxjs';

/**
 * 
 * `触发更新视图`
 *
 */
@Injectable('RenderTrigger')
export class RenderTrigger {

    public colHeaderRender$: Subject<void> = new Subject();
    public rowHeaderRender$: Subject<void> = new Subject();
    public bgBodyRender$: Subject<void> = new Subject();
    public styleRender$: Subject<void> = new Subject();
    public dataRender$: Subject<void> = new Subject();
    public coverRender$: Subject<void> = new Subject();
    public refresh$: Subject<void> = new Subject();
    constructor() {

    }
    public triggerRenderAll() {
        // this.triggerHeaderRender();
        // this.bgBodyRender$.next();
        // this.styleRender$.next();
        // this.dataRender$.next();
        // this.coverRender$.next();
        this.refresh$.next();
    }

    public triggerHeaderRender() {
        this.colHeaderRender$.next();
        this.rowHeaderRender$.next();
    }

}